package com.example.javabasic.sample.bootstrap;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * Spring4.2之后新引入的，效果同ApplicationListener
 *
 * @author: cph
 * @date: 2021/11/11 19:43
 */
@Slf4j
@Component
public class EventListenerTest {

    @EventListener
    public void onApplicationEvent(ContextRefreshedEvent event) {
        log.info(">>>EventListenerTest#onApplicationEvent process...");
    }
}
